// This file is part of Indico.
// Copyright (C) 2002 - 2025 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.

@use 'base' as *;
@use 'contributions/display' as *;
@use 'contributions/editor' as *;
@use 'types_dialog' as *;

@mixin picker-root-element-label() {
  .label {
    @include ellipsis();

    flex-grow: 1;
    flex-basis: 0%;
    display: inline-block;
    line-height: 1.2em;
    text-align: left;
  }
}

#pub-switch {
  display: inline-block;
  position: absolute;
  right: 0;
}

.session-item-picker {
  @include picker-root-element-label();

  width: 100%;
  line-height: 0.9em;
  white-space: nowrap;
}

.track-item-picker {
  @include picker-root-element-label();

  width: 100%;
}

.revision-file-row {
  @include border-left($width: 3px);

  &:hover {
    border-color: $blue;
  }
}

.conference-page .page-content .file-type-header {
  color: $light-black;
}

#contribution-list {
  .subcontribution-count {
    // TODO: Make all .i-labels flexbox and remove the following line
    display: inline-flex;
    align-items: center;

    .label {
      @include ellipsis();

      line-height: 15px;
      vertical-align: middle;
    }

    .badge {
      display: inline-block;
    }
  }

  .icon-user {
    color: $pastel-gray;

    &.exists {
      color: $light-black;
    }
  }

  .tablesorter {
    .material-column {
      width: 5em;
    }

    .id-column {
      width: 4em;
    }

    .time-column {
      width: 11em;
    }

    .duration-column {
      width: 6em;
    }

    .code-column {
      width: 6em;
    }

    .type-column {
      width: 6em;
    }

    .actions-column {
      width: 6em;
      box-sizing: initial;
    }

    .title-column {
      min-width: 10em;
    }
  }
}

#subcontribution-list {
  width: 600px;

  table {
    td.subcontribution-title {
      @include ellipsis();

      max-width: 150px;
    }
  }
}

.qbubble-contrib-start-date {
  max-width: 450px !important;

  .datetime-widget {
    width: 100% !important;
  }

  .timepicker {
    width: 35% !important;
  }
}

.qbubble-contrib-duration {
  max-width: 420px !important;

  .qtip-content {
    overflow: visible;
  }
}

#contributions-fixed-fields {
  margin-bottom: 5px;
}

#display-contribution-list {
  .contrib-id {
    color: $light-black;
  }
}
